import request from '@/utils/request'

// 获取用户列表
export function getPageData(query) {
  return request({ url: '/user/page', method: 'get', params: query })
}

// 用户搜索
export function searchUser(data) {
  return request({ url: '/user/get', method: 'get', data })
}

// 用户详情
export function getUserDetail(query) {
  return request({ url: '/user/query', method: 'get', params: query })
}

// 修改用户状态
export function changeStatus(data) {
  return request({ url: '/user/checkStatus', method: 'post', data })
}

//数据权限 列表回显
export function getDataList(data) {
  return request({ url: '/tagGroup/page', method: 'post', data })
}

//数据权限  新增、 /auth/tagGroup/add
export function getDataAdd(data) {
  return request({ url: '/tagGroup/add', method: 'post', data })
}

//管理平台 》 员工管理 》 员工列表
export function getUserList(query) {
  return request({
    url: '/employee/page',
    method: 'get',
    params: query
  })
}

//新增员工
export function addUserList(data) {
  return request({
    url: '/employee/save',
    method: 'post',
    data
  })
}
//员工岗位下拉列表字典
export function dropDownlist(query) {
  return request({
    url: '/post/pageInternal',
    method: 'get',
    params: query
  })
}

//修改员工信息
export function editUserInfo(data) {
  return request({
    url: '/employee/update',
    method: 'post',
    data
  })
}
//查询单个员工
export function queryEmployee(query) {
  return request({
    url: '/employee/query',
    method: 'get',
    params: query
  })
}
//更改员工状态
export function changeStatusEmplyee(data) {
  return request({
    url: '/employee/checkStatus',
    method: 'post',
    data
  })
}
// 员工列表数据权限查询单个员工标签
export function queryEmployeeTag(data) {
  return request({
    url: '/employeetag/getByEmployCode',
    method: 'post',
    data
  })
}

//删除当前员工
export function deleteCurrentEmployee(query) {
  return request({
    url: '/employee/delete',
    method: 'post',
    params: query
  })
}

//通过标签分组类型获取

export function getByTagEnum(data) {
  return request({
    url: '/store/getByTagEnum',
    method: 'post',
    data
  })
}


